package com.ddtech.business.bank.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ddtech.business.bank.entity.QuestionBank;
import com.ddtech.business.bank.query.QuestionBankQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Mapper 接口
 * @author  bin
 * @date  2023/2/11 15:31
 */
@Mapper
public interface QuestionBankMapper extends BaseMapper<QuestionBank> {
    /**
     * 获取题库列表
     * @param page
     * @param keyWords
     * @return
     */
    IPage<Map<String,Object>> getQueBankList(IPage page, @Param("keyWords") String keyWords,@Param("type") Integer type);

    /***
     * description: 查询题库信息汇总
     * @param:  * @param page
     * @param questionBankQuery
     * @date: 2023-04-28
     * @return: com.baomidou.mybatisplus.core.metadata.IPage<java.util.Map<java.lang.String,java.lang.Object>>
     * @version v1.0
     * @author:wei_zhang(xiao)
     */
    IPage<Map<String, Object>> bankListTotal(IPage page, @Param("questionBankQuery") QuestionBankQuery questionBankQuery);

    /***
     * description: 专项检测查询可用题库列表
     * @param:  * @param page
     * @param questionBankQuery
     * @date: 2023-04-28
     * @return: com.baomidou.mybatisplus.core.metadata.IPage<java.util.Map<java.lang.String,java.lang.Object>>
     * @version v1.0
     * @author:wei_zhang(xiao)
     */
    List<Map<String, Object>> getQueBankListNoPage(@Param("questionBankQuery") QuestionBankQuery questionBankQuery);

    /**
     * description::根据题库ID，查询可用标签
     * @param:  * @param questionBankQuery
     * @date: 2023-12-18
     * @return: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
     * @version v1.0
     * @author:wei_zhang(xiao)
     */
    List<Map<String, Object>> getQueBankListSource(@Param("questionBankQuery") QuestionBankQuery questionBankQuery);
}
